<%-- 
    Document   : index
    Created on : Nov 4, 2011, 2:15:36 PM
    Author     : BPT
--%>

<%@page import="com.tthdhm.truyvetduongdi.pojo.VictimInfoPOJO"%>
<%@page import="java.util.List"%>
<%@page import="com.tthdhm.truyvetduongdi.pojo.TelephoneInfoPOJO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="css/style.css" type="text/css" media="all" rel="stylesheet"/>
        <title>Tìm vét đường đi qua hệ thống GPS</title>
        <script type="text/javascript"
                src="http://maps.googleapis.com/maps/api/js?sensor=false">
        </script>
        <script type="text/javascript" src="js/functionJavacript.js">   
        </script>
        <script type="text/javascript" src="js/jquery-1.6.4.min.js">   
        </script>
    </head>
    <body onload="initialize(10.775639, 106.70042)">
        <div align="center">
            <div class="main">
                <table width="100%" border="0">
                    <tr>
                        <td><div id="banner">
                                <div class="language">
                                    <a href="#"><img src="images/VietNam.jpg" height="30" width="50"/></a>
                                    <a href="#"><img src="images/English.jpg" height="30" width="50"/></a>
                                </div>
                                <img src="images/banner.png" height="100%" width="100%" />
                                <menu class="top-nav">
                                    <ul>
                                        <li><a href="#" >Trang chủ</a></li>
                                        <li><a href="#">Phản hồi</a></li>
                                        <li><a href="#">Hướng dẫn</a></li>
                                        <li><a href="#">Liên hệ</a></li>
                                    </ul>
                                </menu>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table width="100%" border="0" height="100%">
                                <tr>
                                    <td width="20%" valign="top">
                                        <%
                                            Object ktLogin = request.getSession().getAttribute("Login");
                                            if (ktLogin == null) {
                                        %>
                                        <div class="box">
                                            <div class="loginTitle">Đăng nhập hệ thống</div>
                                            <form id="form1" name="loginForm" method="post" action="CustomerServlet">
                                                <input type="hidden" name="action" id="action" class="Textbox" value="Login"/>
                                                <div id="error"></div>
                                                <p>
                                                    <label for="Username" class="Label">Tên đăng nhập</label>
                                                    <input type="text" name="txtUsername" id="txtUsername" class="Textbox"/>
                                                </p>
                                                <p>
                                                    <label for="Password" class="Label">Mật khẩu</label>
                                                    <input name="txtPassword" type="Password" class="Textbox" id="txtPassword" />
                                                </p>
                                                <p>
                                                    <input type="submit" name="Login" id="Login" value="Đăng nhập" class="button" onclick="return checkValueLogin()"/>
                                                    <input type="submit" name="ForgetPassword" id="ForgetPassword" value="Quên mật khẩu" class="button"/>
                                                </p>
                                            </form>   
                                        </div>
                                        <%                                            } else {
                                        %>
                                        <div class="box">
                                            <div class="infoTitle">Thông tin tài khoản</div>
                                            <table>
                                                <tr>
                                                    <td class="info"><a href="#" onclick="return loadPersonInfo('welcome')"><strong id="welcome">Chào bạn, <%=request.getSession().getAttribute("Username")%></strong></a></td>
                                                </tr>
                                                <tr>
                                                    <td class="info"><a href="#" onclick="return loadPersonInfo('changeInfo')"><strong id="changeInfo">Thay đổi thông tin</strong></a></td>
                                                </tr>
                                                <tr>
                                                    <td class="info"><a href="#" onclick="return changePassword()"><strong id="changePassword">Thay đổi mật khẩu</strong></a></td>
                                                </tr>

                                                <tr>
                                                    <td class="info"><a href="CustomerServlet?action=Logout"><strong>Đăng xuất</strong></a></td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="box">
                                            <div class="listTitle">Danh sách thiết bị theo dõi</div>
                                            <table>
                                                <%
                                                    List<VictimInfoPOJO> listVictimInfo = (List<VictimInfoPOJO>) request.getSession().getAttribute("ListID");
                                                    for (int i = 0; i < listVictimInfo.size(); i++) {
                                                %>
                                                <tr>
                                                    <td class="info"><a href="#" onclick="return loadTimer(<%=listVictimInfo.get(i).getTelephoneID()%>)"><strong id="txtTelephoneID<%=listVictimInfo.get(i).getTelephoneID()%>" ><%=listVictimInfo.get(i).getRelation()%></strong></a></td>
                                                </tr>
                                                <%
                                                    }
                                                %>
                                            </table>
                                        </div>
                                        <%
                                            }
                                        %>
                                        <div class="box">
                                            <table cellspacing="0" cellpadding="0" >
                                                <tr>
                                                    <td>
                                                        <div class="supportTitle">HỖ TRỢ TRỰC TUYẾN</div>
                                                        <p><strong>Hỗ trợ kinh doanh</strong></p>
                                                        <table align="center" border="0">
                                                            <tbody>
                                                                <tr>
                                                                    <td><strong>Tp.HCM</strong></td>
                                                                    <td><strong><a href="ymsgr:sendim?adakinhdoanh"><img src="images/online.gif" alt="" border="0" /></a></strong></td>
                                                                </tr>
                                                                <tr>
                                                                    <td><strong>Đà Nẵng</strong></td>
                                                                    <td><strong><a href="ymsgr:sendim?adakinhdoanhdn"><img src="images/online.gif" alt="" border="0" /></a></strong></td>
                                                                </tr>
                                                                <tr>
                                                                    <td><strong>Hà Nội</strong></td>
                                                                    <td><strong><a href="ymsgr:sendim?adakinhdoanhhn"><img src="images/online.gif" alt="" border="0" /></a></strong></td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                        <p><strong><strong>Hỗ trợ kĩ thuật</strong></strong></p>
                                                        <table align="center" border="0">
                                                            <tbody>
                                                                <tr>
                                                                    <td colspan="2"><strong><a href="ymsgr:sendIM?adahotrokythuat"><strong><img src="images/online1.gif" alt="" border="0" /></strong></a></strong> 
                                                                        <strong><a href="ymsgr:sendIM?adahotrokythuat2"><strong><img src="images/online.gif" alt="" border="0" /></strong></a></strong></td>
                                                                </tr>
                                                            </tbody>
                                                        </table></td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="left"><strong>Điện thoại hỗ trợ</strong>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="center">
                                                        <div class="tel">(+84) 932 561 440 </div>
                                                        <div class="tel">(+84) 933 201 306</div>
                                                        <div class="tel">(+84) 1696 883 240</div>
                                                        <div class="tel">(+84) 1656 198 008</div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="left"><strong>Email liên hệ</strong></td>
                                                </tr>
                                                <tr>
                                                    <td><a href="http://www.gmail.com"><div class="Label">* phutuong24101990 @gmail.com</div></a>
                                                        <a href="http://www.gmail.com"><div class="Label">* vanven08ctt03 @gmail.com</div></a>
                                                        <a href="http://www.gmail.com"><div class="Label">* nvtin0502 @gmail.com</div></a>
                                                        <a href="http://www.gmail.com"><div class="Label">* cpvinh@gmail.com</div></a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                    <td width="76%" valign="top">
                                        <div class="mainContent">
                                            <div class="search">
                                                <form action="" method="get">
                                                    <table>
                                                        <tr>
                                                            <td><label for="DiaChi"><strong>Địa chỉ</strong></label>
                                                                <input type="text" name="DiaChi" id="DiaChi" class="Textbox" /></td>
                                                            <td><img src="images/search.png" /></td>
                                                        </tr>
                                                    </table>
                                                </form>
                                            </div>
                                            <div id="map_canvas" style="width:100%; height:600px"></div>
                                            <div class="line-hor"></div>
                                            <div align="center">
                                                <a href="#" class="button" onclick="getAddress(10.1234, 106.124)">Vị trí cuối</a>
                                                <a href="#" class="button">Theo dõi</a>
                                                <a href="#" class="button">Xem lại</a>
                                            </div>
                                            <div class="line-hor"></div>
                                            <div id="Info" align="center"></div>
                                        </div></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <div class="footer"><a href="#">Trang chủ</a> | 
                                <%
                                    if (ktLogin == null) {
                                %>
                                <a href="#">Đăng nhập</a>
                                <%                            } else {
                                %>
                                <a href="#">Thông tin tài khoản</a>
                                <%                                }
                                %>
                                | <a href="#">Phản hồi</a> | <a href="#">Hướng dẫn</a> | <a href="#">Liên hệ</a><br />
                                <a href="#">Hệ thống định vị trên thiết bị di động</a><br />
                                Giải pháp định vị : <a href="#">GSM/GPRS, GPS wireless Solution</a><br />
                                Copyright © 2010 design by group <a href="#">T2V</a><br />
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </body>
</html>
